package chapter15;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author : DuJiabao
 * @Date : 2021/3/4 15:05
 * @Project : thinking_in_java
 * @File : null.java
 * @Desc :
 */
public class New {
  public static <K, T> Map<K, T> map() {
    return new HashMap<>();
  }
  public static <T> List<T> list() {
    return new ArrayList<>();
  }

  public static void test(Map map) {
    System.out.println(map);
  }

  public static void test2(Map<Integer, Integer> map) {
    System.out.println(map);
  }

  public static void main(String[] args) {
    Map<Integer, Integer> map = New.map();
    test(New.map());
    test2(New.map());
  }
}
